import type fs from 'fs';

export class FileAdded {
  readonly _tag = 'FileAdded'

  constructor(public path: string, public stats: Partial<fs.Stats>) {}
}

export class FileRemoved {
  readonly _tag = 'FileRemoved'

  constructor(public path: string, public stats: Partial<fs.Stats>) {}
}

export class FileChanged {
  readonly _tag = 'FileChanged'

  constructor(public path: string, public stats: Partial<fs.Stats>) {}
}

export class DirectoryAdded {
  readonly _tag = 'DirectoryAdded'

  constructor(public path: string, public stats: Partial<fs.Stats>) {}
}

export class DirectoryRemoved {
  readonly _tag = 'DirectoryRemoved'

  constructor(public path: string, public stats: Partial<fs.Stats>) {}
}

export type FileSystemEvent = FileAdded | FileRemoved | FileChanged | DirectoryAdded | DirectoryRemoved